home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / lmwrap / igl / globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-11  |  2.2 KB  |  77 lines

  1. /*
  2.  * Copyright (c) 1995, Silicon Graphics, Inc.
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that the name of Silicon Graphics may not be used in any advertising or
  7.  * publicity relating to the software without the specific, prior written
  8.  * permission of Silicon Graphics.
  9.  *
  10.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
  11.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
  12.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  13.  *
  14.  * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  15.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
  16.  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE
  17.  * POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
  18.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  19.  *
  20.  * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  21.  */
  22. /*----------------------------------------------------------------------------
  23.  *
  24.  * file   : globals.h
  25.  *
  26.  * Author : Yusuf Attarwala
  27.  * Date   : Apr 94
  28.  *
  29.  *---------------------------------------------------------------------------*/
  30. #include <stdio.h>
  31. #include <X11/Intrinsic.h>
  32. #include <Xm/Xm.h>
  33. #include <gl.h>
  34.  
  35. #ifdef DEFINE_GLOBALS
  36. #define GLOBAL
  37. #define INIT(x) = x
  38. #else
  39. #define GLOBAL extern
  40. #define INIT(x)
  41. #endif
  42.  
  43. #include "defines.h"
  44.  
  45. GLOBAL Display        *display;
  46. GLOBAL long            screen;
  47. GLOBAL XtAppContext    appContext;
  48. GLOBAL XtTranslations  transTable;
  49. GLOBAL Widget          toplevel,
  50.                        glw;
  51.  
  52. GLOBAL Dimension       window_height,
  53.                        window_width;
  54.  
  55. GLOBAL Angle  anglex,angley,anglez;
  56.  
  57. static Matrix identity = {1.0,0.0,0.0,0.0,
  58.                           0.0,1.0,0.0,0.0,
  59.                           0.0,0.0,1.0,0.0,
  60.                           0.0,0.0,0.0,1.0};
  61.  
  62. GLOBAL unsigned long cpackValue;
  63.  
  64. GLOBAL int    doLighting,     /* bunch of state flags */
  65.           doDisplayList,
  66.           doTumble,
  67.           refresh,
  68.           doubleBuffer;
  69.  
  70. GLOBAL int    curLModel,
  71.           curMatSet,
  72.           curLight;         /* although can have more */
  73.  
  74. /* these should be on the last lines */
  75. #undef INIT
  76. #undef GLOBAL
  77.